"""
按照以下要求定义一个游乐园门票的类，并尝试计算2个成人+1个小孩平日票价。
平日票价100元
周末票价为平日的120%
儿童半票
"""


class Amusementpark:
    adult_num = 0
    child_num = 0

    def __init__(self):
        self.adult_common_price = 100
        self.child_common_price = 50
        self.adult_weekend_price = 120
        self.child_weekend_price = 60

    def calculate_common_price(self, adult_num, child_num):
        self.adult_num = adult_num
        self.child_num = child_num
        return self.adult_num * self.adult_common_price + self.child_num * self.child_common_price


if __name__ == "__main__":
    amuse = Amusementpark()
    print("2个成人+1个小孩平日票价为：%d" % amuse.calculate_common_price(2, 1))
